package com.nondo.dean.product.model;

import com.nondo.dean.common.tool.BeanUtils;
import com.nondo.dean.product.domain.ProductCategory;

public class CategoryBean {
    private Integer id; // 主键ID
    private String name; // 分类名称
    private String image; // 分类图片
    private Integer pid; // 父分类ID
    private Integer orderNum; // 分类排序值

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    
    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public static CategoryBean covertToBean(ProductCategory productCategory) {
        CategoryBean categoryBean = new CategoryBean();
        BeanUtils.copy(productCategory, categoryBean);
        return categoryBean;
    }

}
